Problem Solving in C and Python: Programming Exercises and Solutions Part 1 by ikl1232003

Problem Solving in C and Python: Programming Exercises and Solutions Part 1 by ikl1232003

Author:ikl1232003
Language: eng
Format: epub
Tags: problem solving skills, programming c, introductory programming, introductory software design, programming python


Discussion

Input:

1. integer representing the main menu choice, stored in main_choice.

2. integer indicating secondary menu choice, stored in second_choice.

3. floating point number indicating payment amount, stored in payment (in case and main_choice is 2).

4. character confirming the main menu or secondary menu choice, stored in confirm.

Output: the message describing the menu choice or account balance, or an error message; for main menu, the message indicating confirmation of the choice.

Calculations: Use an if-elif-else statement in Python, and switch statement in C.

Input Limitations: the payment amount must be positive.

Output Limitations: None.

Constant Variables: in this problem there is one constant value that is defined in the problem description: 199.99. To define constant values in C, we will continue to use the const keyword.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.